package cn.zy.gvs;

import cn.hutool.core.net.NetUtil;
import org.dromara.x.file.storage.spring.EnableFileStorage;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan("cn.zy.gvs.v1.mapper")
@EnableFileStorage
@EnableScheduling
@EnableTransactionManagement
public class GvsApplication {

    public static void main(String[] args) {
        final ConfigurableApplicationContext context = SpringApplication.run(GvsApplication.class, args);
        String port = context.getEnvironment().getProperty("server.port");
        String contextPath = context.getEnvironment().getProperty("server.servlet.context-path");
        System.out.println(">==================================================<");
        System.out.println(">                 Start Success!!!                 <");
        for (String localIpv4 : NetUtil.localIpv4s()) {
            System.out.println(">    Request the address:   " + localIpv4 + ":" + port + contextPath + "   <");
        }
        System.out.println(">==================================================<");
    }
}
